package day1.demo4;

public class Test {
    public static void main1(String[] args) {
        Person p = new Stu();
        p.show();
        System.out.println(p.age);

    }

    public static void main2(String[] args) {
        Object o = new Stu();
//        String s = (String)o;
        Person p = (Person) o;
        Itf i = (Itf) o;
//        o.show();4
    }

    public static void main(String[] args) {
        Object o = new Stu();
        if(o instanceof Itf){
            System.out.println("true");
        }
    }
}
